import { fetch, fetchJSONP } from '@/api/request';

const ONE_TRY = 'https://cloud.discuz.chat/api/cloud/oneclicktrial';

const API_ZZCONFIG = 'https://qzonestyle.gtimg.cn/qzone/qzactStatics/qcloud/data/31/config2.js';

// 获取dzq版本
const API_DZ_VERSION = 'https://cloud.discuz.chat/latest.json';

export const getDZQVersion = () => {
  return fetch({
    url: API_DZ_VERSION,
  });
};

// 一键试用
export const getOneTry = () => {
  return fetch({
    url: ONE_TRY,
  });
};

/**
 * 获取配置信息
 */
export const getConfig = () => {
  return fetchJSONP(API_ZZCONFIG, { name: 'callback_31_config2' });
};
